package Kuaishou;

import java.util.List;

/**
 * @author leiwenkang <leiwenkang@kuaishou.com>
 * Created on 2022-04-26
 */
public class Test52库存扩量系数 {
    public static void main(String[] args) {
        String dateStr = "20220520\n" +
                "20220521\n" +
                "20220522\n" +
                "20220523\n" +
                "20220524\n" +
                "20220525\n" +
                "20220526\n" +
                "20220527\n" +
                "20220528\n" +
                "20220529\n" +
                "20220530\n" +
                "20220531\n" +
                "20220601\n" +
                "20220602\n" +
                "20220603\n" +
                "20220604\n" +
                "20220605\n" +
                "20220606\n" +
                "20220607\n" +
                "20220608\n" +
                "20220609\n" +
                "20220610\n" +
                "20220611\n" +
                "20220612\n" +
                "20220613\n" +
                "20220614\n" +
                "20220615\n" +
                "20220616\n" +
                "20220617\n" +
                "20220618\n" +
                "20220619\n" +
                "20220620";
        String ratioStr = "1.60485\n" +
                "2.4158\n" +
                "1.81383\n" +
                "1.1595\n" +
                "1.14797\n" +
                "1.42877\n" +
                "1.36271\n" +
                "1.60485\n" +
                "2.4158\n" +
                "1.81383\n" +
                "1.1595\n" +
                "1.14797\n" +
                "1.42877\n" +
                "1.36271\n" +
                "1.60485\n" +
                "2.4158\n" +
                "1.81383\n" +
                "1.1595\n" +
                "1.14797\n" +
                "1.42877\n" +
                "1.36271\n" +
                "1.60485\n" +
                "2.4158\n" +
                "1.81383\n" +
                "1.1595\n" +
                "1.14797\n" +
                "1.42877\n" +
                "1.36271\n" +
                "1.60485\n" +
                "2.4158\n" +
                "1.81383\n" +
                "1.1595";

       printConfig(dateStr, ratioStr);


       String ratioStr2 = "1.24334\n" +
               "1.2046\n" +
               "1.18934\n" +
               "1.14917\n" +
               "1.19913\n" +
               "1.25673\n" +
               "1.25773\n" +
               "1.24334\n" +
               "1.2046\n" +
               "1.18934\n" +
               "1.14917\n" +
               "1.19913\n" +
               "1.25673\n" +
               "1.25773\n" +
               "1.24334\n" +
               "1.2046\n" +
               "1.18934\n" +
               "1.14917\n" +
               "1.19913\n" +
               "1.25673\n" +
               "1.25773\n" +
               "1.24334\n" +
               "1.2046\n" +
               "1.18934\n" +
               "1.14917\n" +
               "1.19913\n" +
               "1.25673\n" +
               "1.25773\n" +
               "1.24334\n" +
               "1.2046\n" +
               "1.18934\n" +
               "1.14917";

        printConfig(dateStr, ratioStr2);

        String ratioStr3 = "1.49438\n"
                + "1.90842\n"
                + "1.43578\n"
                + "1.33157\n"
                + "1.32947\n"
                + "1.32842\n"
                + "1.36175\n"
                + "1.49438\n"
                + "1.90842\n"
                + "1.43578\n"
                + "1.33157\n"
                + "1.32947\n"
                + "1.32842\n"
                + "1.36175\n"
                + "1.49438\n"
                + "1.90842\n"
                + "1.43578\n"
                + "1.33157\n"
                + "1.32947\n"
                + "1.32842\n"
                + "1.36175\n"
                + "1.49438\n"
                + "1.90842\n"
                + "1.43578\n"
                + "1.33157\n"
                + "1.32947\n"
                + "1.32842\n"
                + "1.36175\n"
                + "1.49438\n"
                + "1.90842\n"
                + "1.43578\n"
                + "1.33157";

        printConfig(dateStr, ratioStr3);
    }

    public static void printConfig(String dateStr, String ratioStr) {
        String[] dateArr = dateStr.split("\n");
        String[] ratioArr = ratioStr.split("\n");

        int length = dateArr.length;

        StringBuilder printStr = new StringBuilder();
        printStr.append("{");
        for (int i = 0; i < length; i++) {
            printStr.append("\\");
            printStr.append("\"");
            printStr.append(dateArr[i]);
            printStr.append("\\");
            printStr.append("\":");
            printStr.append(ratioArr[i]);
            printStr.append(",");
        }

        System.out.println(printStr.substring(0, printStr.length() - 1) + "}");
    }
}
